<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--临时查询form表单,可以增加一些分页的查询参数等,如果某一操作触发当前页面刷新,默认情况下提交此form进行查询-->
<form id="pagerForm" method="get" action="${ctx }/course/getChapters?courseId=${course.id}">
    <input type="hidden" name="pageNum" value="1"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="name" value=""/>
    <input type="hidden" name="level" value=""/>
</form>

<div class="pageHeader">
<%--     <form onsubmit="return navTabSearch(this);" method="get" action="${ctx }/course/getList">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        名称：<input type="text" name="name" value="${name}" maxlength="50"/>
                    </td>
                    <td>
                        等级：<input type="text" name="level" value="${level}" maxlength="50"/>
                    </td>
                    <td><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
                </tr>
            </table>
        </div>
    </form> --%>
</div>

<div class="pageContent">

	
	<div class="panelBar">
        <ul class="toolBar">
            <li>
                <a class="add" href="${ctx }/course/toAddChapter?courseId=${course.id }" target="dialog" mask="true" rel="coursechapter_add"
                   title="添加章节信息">
                    <span>添加章节信息</span>
                </a>
            </li>
        </ul>
    </div>

    <table class="table" width="100%" layoutH="88">
        <thead>
        <tr>
            <th width="30">序号</th>
            <th width="120">课程名称</th>
            <th width="240">章节名称</th>
            <th>章节编号</th>
            <th width="100">章节序号</th>
            <th width="100">章节描述</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${chapterList}" var="chapter" varStatus="status">
            <tr target="switch_id" rel="${chapter.id}">
                <td>${status.index+1}</td>
                <td>${course.name}</td>
                <td>${chapter.name}</td>
                <td>${chapter.busiName }</td>
                <td>${chapter.seq}</td>
                <td>${chapter.descri}</td>
                <td>详情    <a href="${ctx }/course/toUpdateChapter?id=${chapter.id}&courseId=${course.id}" target="dialog" mask="true" rel="coursechapter_add"
                   title="修改章节">修改</a></td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
    
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共${totalCount}条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="20" pageNumShown="10" currentPage="${currentPage }"></div>
</div>

</div>
